package com.snackshop.advice;

import com.snackshop.pojo.vo.R;
import com.snackshop.pojo.vo.ResponseState;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler(Exception.class)
    public R exceptionHandler(Exception e){
        e.printStackTrace();
        return R.RESULT(ResponseState.FAILED);
    }
}
